package com.example.j2eeapp.dao;

import com.example.j2eeapp.commons.dao.GenericDao;
import com.example.j2eeapp.domain.UserEntity;

/**
 * 
 * Data Acess Object interface to work with User entity database operations
 * 
 * @author cipherCata
 *
 */
//extends the GenericDao to use its methods base on the UserEntity enter by the client
public interface UserDao extends GenericDao<UserEntity, Long> {
	
	/**
	 * Queries database for user name availability
	 * 
	 * 
	 * @param userName
	 * @return true if the request username is available
	 */
	boolean checkAvailable(String userName);
	
	
	/**
	 * 
	 * Queries user by username
	 * 
	 * @param userName
	 * @return User entity
	 */
	
	//load user by username and return user entity
	UserEntity loadUserByUserName(String userName);
}
